package com.foreveross.proxyip;

import com.foreveross.crawl.common.cfg.ConfigLocalLoader;
import com.foreveross.crawl.common.cfg.PropertiesConfigLocalLoader;
import com.foreveross.crawl.common.cfg.PropertyUtils;

public class ProxyipProperties extends PropertiesConfigLocalLoader implements ConfigLocalLoader{
	
	public final static String CONFIG_FILE = "proxyip-config.properties";
	
	public final static String PROXY_IP_PROVIDER_ENABLE = "proxyip.provider.enable";
	
	public final static String PROXY_IP_PROVIDER_CLASS = "proxyip.provider.class";

	public final static String PROXY_IP_PROVIDER_REPRATCOUNT = "proxyip.provider.repeatCount";
	
	public final static String PROXY_IP_PROVIDER_REPRATINTERVAL = "proxyip.provider.repeatInterval";
	
	@Override
	public String getFileName() {
		return CONFIG_FILE;
	}
	
	public static boolean isProxyEnable(){
		return PropertyUtils.getBooleanProperty(PROXY_IP_PROVIDER_ENABLE, CONFIG_FILE);
	}
	public static Integer getIpRepeatCount(){
		return PropertyUtils.getIntProperty(PROXY_IP_PROVIDER_REPRATCOUNT, CONFIG_FILE);
	}
}
